Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The CI workflow runs only for pull requests into main, so it runs once this pull request targets main.
Moving the focus ring after the forced-colors selection style restores the ring on a selected or highlighted thread whose toggle has keyboard focus, as the Comments docs describe, and the new test covers both states. There are no blocking findings.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: no file overlaps with the stacked pull requests, and the change applies cleanly to
main: verified (no shared file, the two files are identical onmain, and the commit merges cleanly ontomain). - Claim: on a focused selected or highlighted thread, the later forced-colors selection style removed the ring outside forced colors: verified (the base style order in
CommentRow.tsxand that style'snulloutline defaults). - Claim: unselected threads already showed the ring: verified (only selected or highlighted threads take that style,
CommentRow.tsx:890). - Claim: the ring now comes last, and forced colors keep the selection outline on an unfocused thread and show the ring on a focused one: verified (
CommentRow.tsx:242-246and the forced-colors captures). - Claim: the Comments docs say the whole surface takes the focus ring while the toggle has focus: verified (
Comments.doc.mjs:143). - Claim: the interaction-modality architecture shows the shared focus indicator after keyboard input: verified (
docs/architecture/interaction-modality.mdINV1). - Claim: an audit list records the missing ring as open on
main: the list is not in the repository; the base code matches the observation. - Claim: only the style order and one comment change in source: verified (diff).
- Claim: the new test checks the ring's classes for a selected and a highlighted thread and fails without the fix: verified by reading (
CommentThread.test.tsx:215-250against the base order); not run in this review. - Claim: tests, lint, formatting and the pre-review script pass: not verified in this review; CI runs them before merge.
- Claim: before and after captures in light, dark and forced colors: viewed; they match the code.
- Claim: validated on an earlier
mainand rebased onto the stack'smainbase: verified (both commits are onmain). - Claim: one defect, no tagalong, no new API and no internal context: verified (diff and text scan).
- File:
packages/lab/src/Comments/CommentRow.tsx: clear. - File:
packages/lab/src/Comments/CommentThread.test.tsx: clear.
20fb61c to
5ee7172
Compare
40e589a to
a9f094d
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The CI workflow runs only for pull requests into main or a release branch, so it runs once this pull request targets main.
Moving the focus ring after the forced-colors selection style restores the ring on a selected or highlighted thread whose toggle has keyboard focus, as the Comments docs describe, and there are no blocking findings. Reproduced locally: the open thread's surface has no outline on the base and the 2px ring on this head, in light and dark, and the new test fails on the base and passes here.
Claims and files checked
Review mode: full; reason: recipe-changed (many rules)
- Claim: the change touches none of CommentPin's files and applies cleanly to
main: verified (two Comments files; the patch applies tomain, where both files match the base branch). - Claim: a keyboard user on a selected or highlighted thread saw no focus indicator: verified (reproduced locally on the base in light and dark; the new test fails there for both states).
- Claim: unselected threads already showed the ring: verified (only selected or highlighted threads take the forced-colors style,
CommentRow.tsx:890). - Claim: the forced-colors selection style came after the ring and removed it outside forced colors: verified (the base style order and that style's
nulloutline defaults). - Claim: the ring now comes last, and only the style order and one comment change in source: verified (
CommentRow.tsx:240-246). - Claim: forced colors keep the selection outline on an unfocused selected thread and show the ring on a focused one: verified (reproduced locally; the unfocused frames are identical before and after).
- Claim: the Comments docs say the whole surface takes the system focus ring while the toggle has focus: verified (
Comments.doc.mjs:143). - Claim: the interaction-modality architecture shows the shared focus indicator after keyboard input: verified (its INV1).
- Claim: an audit list records the missing ring as open on
main: reported; the list is not in the repository, and the base reproduction matches it. - Claim: after the change the surface has a solid 2px ring in the focus color, in light and dark, in real Chromium: verified (reproduced locally).
- Claim: the new test checks the ring's classes for a selected and a highlighted thread and fails without the fix: verified (run locally on this head and on the base with the new test).
- Claim: the Comments tests pass, and ESLint and Prettier are clean on the changed files: verified (run locally).
- Claim: the pre-review script reports no findings: reported; not run in this review.
- Claim: validated on an earlier
mainand rebased onto a latermainwithout conflicts: verified (both commits are onmain). - Claim: one defect, no tagalong, no new public API, default or interaction model, and no internal context: verified (diff and text scan).
- File:
packages/lab/src/Comments/CommentRow.tsx: clear. - File:
packages/lab/src/Comments/CommentThread.test.tsx: clear.
43dc229 to
d0165a7
Compare
A thread's hidden toggle shows keyboard focus through a focus ring on the thread's surface. On a selected or host-highlighted thread, the forced-colors selection outline came after the ring in the style list and unset its outline outside forced colors, so a keyboard user on the thread they work in saw no focus. The ring now comes last. Forced colors keep the selection outline on an unfocused thread.
a9f094d to
e642a67
Compare
|
Rebased onto Repeated on this head: |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The CI workflow runs only for pull requests into main or a release branch, so it runs once this pull request targets main.
Moving the focus ring after the forced-colors selection style restores the ring on a selected or highlighted thread whose toggle has keyboard focus, as the Comments docs describe, and there are no blocking findings. Reproduced locally on this head: the new test fails on the base and passes here, and the Comments tests, ESLint and Prettier are clean.
Claims and files checked
Review mode: carry-forward; reason: none
- Claim: a selected or highlighted thread shows its focus ring (title): verified (the new test asserts the ring's classes for both states; run locally, it passes here and fails on the base).
- Claim: it is stacked on #13735, which is stacked on #13702: verified (this pull request targets #13735's branch, and #13735 targets #13702's).
- Claim: the change touches none of CommentPin's files and applies cleanly to
mainon its own: verified (only two Comments files change, and both are identical onmainand the base). - Claim: a keyboard user on a selected or highlighted thread saw no focus indicator: verified (the new test fails on the base for both states, run locally).
- Claim: unselected threads already showed the ring: verified (only selected or highlighted threads take the forced-colors style,
CommentRow.tsx:890). - Claim: the forced-colors selection style came after the ring and removed it outside forced colors: verified (the base style order and that style's
nulloutline defaults,CommentRow.tsx:162-176). - Claim: Enter or Space on the thread toggle opens and closes the thread: verified (
Comments.doc.mjs:143; the existing keyboard test passes locally). - Claim: the ring now comes last, and only the style order and one comment change in source: verified (
CommentRow.tsx:240-246). - Claim: forced colors keep the selection outline on an unfocused selected thread and show the ring on a focused one: verified from the code (an unfocused thread gets the same style list on the base and here, and a focused one takes the ring's outline properties last,
CommentRow.tsx:242-246); the author's screenshots agree. - Claim: the Comments docs say the whole surface takes the system focus ring while the toggle has focus: verified (
Comments.doc.mjs:143). - Claim: the interaction-modality architecture shows the shared focus indicator after keyboard input: verified (its INV1).
- Claim: an audit list records the missing ring as open on
main: reported; the list is not in the repository, and the base test failure matches it. - Claim: in real Chromium the surface had no outline before and has a solid 2px ring in the focus color after, in light and dark: reported (the author's screenshots); the new test, run locally, finds the ring's style and width classes here, and the focus tokens are 2px solid in the accent color.
- Claim: the new test checks the ring's classes for a selected and a highlighted thread and fails without the fix: verified (run locally on this head and on the base with the new test).
- Claim: the Comments tests pass (96), and ESLint and Prettier are clean on the changed files: verified (run locally on this head: 4 files, 96 tests).
- Claim: the pre-review script reports no findings: reported; not run in this review.
- Claim: rebased onto
mainwith no change to its own diff: verified (the patch is byte-identical to the one reviewed before the rebase, and the namedmaincommit is onmain). - Claim: one defect, no tagalong, no new public API, visual representation, default or interaction model hidden, and no internal context: verified (diff and text scan; the forced-colors pairing is stated in the description).
- File:
packages/lab/src/Comments/CommentRow.tsx: clear. - File:
packages/lab/src/Comments/CommentThread.test.tsx: clear.
Stacked on #13735 (CommentPin moves to Core), which is stacked on #13702, only so the Comments move includes this fix. It touches none of CommentPin's files and applies cleanly to
main(2608fe4) on its own.User impact
A keyboard user who tabs to a Comments thread that is selected (open) or highlighted by the host sees no focus indicator. That is the thread they are working in, so they lose track of where focus is. Unselected threads show the ring.
Problem and solution fit
The ring now comes last in the style list. Forced colors still draw the selection outline on an unfocused selected thread, and the ring on a focused one.
Expected behavior and authority
architecture:interaction-modality: keyboard focus uses the shared focus-visible treatment.mainin Chromium before this change:outline-style: noneon a selected, focused thread.Smallest restoration
The style order in
CommentRowchanges sosurfaceFocusedfollowsselectedForcedColors. One comment says why the order matters. Nothing else changes.Evidence
:focus-visibleapplies. The surface's computed outline isnone, in light and dark.solid 2pxwith the focus color, in light and dark.CommentThread.test.tsxchecks the focus-ring classes on[data-thread-surface]for a selected and a highlighted thread. It fails without the fix.Scope
Components: Comments, CommentThread
Testing
vitest run packages/lab/src/Comments: pass. The new cases fail without the fix.pnpm review:pre: 0 findings.prettierandeslinton the changed files: clean.Real Chromium (Playwright) on static Storybook builds of
mainand this branch, scoped to#storybook-root: light, dark, and forced colors, with the toggle focused and no pointer input.Rebased onto
mainat 2608fe4, with no change to its own diff (the same patch ID as before the rebase). Repeated on this head:vitest run packages/lab/src/Comments: 96 passed.pnpm review:pre: 0 findings.